This demo illustrates how to design an ORMapping on top of the Interbase demo database "Employee".
The mapping file is
EcoyeeMapping.xml. Many of the classes have
single column primary keys, but some of them use compound keys (for example Job and SalaryHistory).
The demo requires Interbase and that the Employee example database is installed in its default location.
In regions where the decimal separator is something other than ".", there is a bug in Borland Data Provider that
prevents loading data from columns with the type "DECIMAL". If you get the error:
An error occurred when reading query field value for Sales.TotalValue
Error: FormatException Message: Input string was not in a correct format
you can get around the problem with the following code:
using System.Globalization;
...
{
CultureInfo newCulture = CultureInfo.CurrentCulture.Clone() as CultureInfo;
newCulture.NumberFormat.CurrencyDecimalSeparator = ".";
newCulture.NumberFormat.NumberDecimalSeparator = ".";
System.Threading.Thread.CurrentThread.CurrentCulture = newCulture;
}